package com.evil.kingdom.pojo.enums;

import com.evil.common.core.exception.BusinessException;
import com.evil.kingdom.pojo.enums.result.RCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 战斗结果
 *
 * @author liyang
 * @date 2024-06-12 09:58
 */
@Getter
@AllArgsConstructor
public enum AttackResultEnum {

    ATTACK_CONTINUE(1, "战斗继续"),
    ATTACK_VICTORY(2, "战斗胜利"),
    ATTACK_DEFEAT(3, "战斗败北"),
    ;

    private final int type;
    private final String title;

    public static BusinessException error() {
        return new BusinessException(RCodeEnum.ERROR_PARAMETER, "战斗结果类型错误");
    }
}
